<#assign base=request.contextPath>
<!DOCTYPE html>
<html>
	<head>
		<title> </title>
		<#include "common/reference.ftl">
	</head>
	<body class="${configs["skinName"]}">
		<div id="sidebar" class="sidebar" style="display:block !important;margin-top:0px !important;">
			<ul id="navlist" class="nav nav-list">
			<#if menus?exists && (menus?size gt 0)>
				<#list menus as menu>
				    <#assign activeClass="">
					<#if menu.menuId == 1>
						<#assign activeClass="active">
					</#if>
					<#assign iconCss="icon-desktop">
					<#if menu.iconCss??>
						<#assign iconCss=menu.iconCss>
					</#if>
					<li class="open">
					<#if menu.children?exists && (menu.children?size gt 0)>
						<a class="dropdown-toggle handle">
							<i class="${iconCss}"></i>
							<span class="menu-text">${menu.menuName}</span>
							<b class="arrow icon-angle-down"></b>
						</a>
					<#else>
						<a  class="handle" <#if menu.actionUrl?exists && menu.actionUrl?length gt 0> target="main_frame" href="${base}/menu/${menu.menuId}" </#if> >
							<i class="${iconCss}"></i>
							<span class="menu-text">${menu.menuName}</span>
						</a>
					</#if>
					<#if menu.children?exists && (menu.children?size gt 0)>
						<ul class="submenu" style="display:block;">
							<#list menu.children as submenu>
								<li>
									<#if submenu.children?exists && (submenu.children?size gt 0)>
									<a class="dropdown-toggle handle">
										<i class="fa fa-angle-double-right"></i>
										<#if submenu.iconCss?exists && submenu.iconCss?length gt 0 >
										<i class="${submenu.iconCss}"></i>
										</#if>
										${submenu.menuName}
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<#list submenu.children as thirdmenu>
											<li>
												<a class="handle" <#if thirdmenu.actionUrl?exists && thirdmenu.actionUrl?length gt 0> target="main_frame" href="${base}/menu/${thirdmenu.menuId}" </#if> >
													<i class="fa fa-angle-double-right"></i>
													<#if thirdmenu.iconCss?exists && thirdmenu.iconCss?length gt 0 >
													<i class="${thirdmenu.iconCss}"></i>
													</#if>
													${thirdmenu.menuName}
												</a>
											</li>
										</#list>
									</ul>
									<#else>
									<a class="handle" <#if submenu.actionUrl?exists && submenu.actionUrl?length gt 0> target="main_frame" href="${base}/menu/${submenu.menuId}" </#if> >
										<i class="fa fa-angle-double-right"></i>
										<#if submenu.iconCss?exists && submenu.iconCss?length gt 0 >
										<i class="${submenu.iconCss}"></i>
										</#if>
										${submenu.menuName}
									</a>
									</#if>
								</li>
							</#list>
						</ul>
					</#if>
					</li>
				</#list>
			</#if>
			</ul>
		</div>
		<script type="text/javascript">
		$(function(){
			var items = $('#navlist').find('li');
			$(items).click(function(e){
				//e.preventDefault(); 
				//e.stopPropagation();
				$(items).removeClass('active');
				$(this).parents('li').addClass('active');
				$(this).addClass('active');
				return true;
			});
		})
		</script>
	</body>
</html>